<?php
header("content-type:text/html;charset=utf8");
$link =@mysql_connect('127.0.0.1','root','root');
if(!$link){
    die('连接失败，错误号为：'.mysql_errno().'失败原因：'.mysql_error());
}
mysql_select_db('blog');
mysql_set_charset('utf8');
$sql = "delete from `comment` where id={$_GET['id']}";
$res = mysql_query($sql) or mysql_error();
mysql_close();

if($res){
    echo '<script>alert("删除成功");window.location.href="/admin/comment/index.php"</script>';
}else{
    echo '<script>alert("删除失败");window.location.href="/admin/comment/index.php"</script>';
}

?>